package com.ssy.lingxi.order.controller.web;

import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.order.model.vo.basic.request.OrderPageVO;
import com.ssy.lingxi.order.model.vo.buyer.response.BaseBuyerOrderQueryVO;
import com.ssy.lingxi.order.model.vo.buyer.response.TransitionOrderQueryVO;
import com.ssy.lingxi.order.service.web.IOrderTransitionService;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @menu 订单能力 - 订单转单
 * @author xiechenhui
 * @version 2.0.0
 * @date 2022-03-18
 */
@RestController
@RequestMapping("/order/transition")
public class OrderTransitionController {

    @Resource
    private IOrderTransitionService orderTransitionService;

    /**
     * 查询订单转单列表
     * @param headers  Http头部信息
     * @param pageVO 接口参数
     * @return 查询结果
     */
    @RequestMapping(value = "/page", method = RequestMethod.GET)
    public Wrapper<PageData<TransitionOrderQueryVO>> getTransitionOrderListPage(@RequestHeader HttpHeaders headers, @Valid OrderPageVO pageVO) {
        return orderTransitionService.getTransitionOrderListPage(headers, pageVO);
    }
}
